package com.dream.xiaobo.service;

import com.dream.xiaobo.entity.User;

import java.sql.SQLException;
import java.util.List;

/**
 * @author xiaobo
 * @date 2021/8/27 - 21:30
 */
public interface UserService {

    /**
     * 检查用户是否存在的逻辑接口
     * @param username
     * @return
     * @throws SQLException
     */
    boolean checkUser(String username) throws SQLException;

    /**
     * 注册逻辑接口
     * @param user
     * @return
     */
    Integer rigistUser(User user) throws SQLException;

    /**
     * 激活用户逻辑接口
     * @param c
     * @return
     */
    Integer activeUser(String c) throws SQLException;

    /**
     * 登录逻辑接口
     * @param username
     * @param password
     * @return
     */
    User loginUser(String username, String password) throws SQLException;

    List<User> checkRoleUser() throws SQLException;

    void deleteUser(String uId) throws SQLException;

    List<User> checkStatusUser() throws SQLException;
}
